<?php
class profile_Profile extends DomainObject
{
	/**
	 * @var profileId The id of the profile row in the DB
	 */
	protected $profileId;
	
	/**
	 * @var the user id that the profile belongs to
	 */
	protected $userId;
	
	
	
	/**
	 * @var the nickname that the user goes by
	 *
	 */
	protected $nickname;
	
	
	
	
	public function __construct()
	{
		
	}
	
	public function setId($id)
	{
		$this->profileId = $id;
		$this->markDirty($this);
	}
	
	public function getId()
	{
		return $this->profileId;
	}
	
	
	public function setNickname($name)
	{
		$this->nickname = $name;
		$this->markDirty($this);
	}
	
	public function getNickname()
	{
		return $this->nickname;
	}
	
	public function setUserId($userId)
	{
		$this->userId = $userId;
	}
	
	public function getUserId()
	{
		return $this->userId;
	}
	
	/**
	 * will return a default validator if one isn't set already
	 */
	public function getDefaultValidator() 
	{
		if(is_null($this->_Validator)) {
			return new profile_validation_Default();
		}
		return $this->_Validator;
	}
}
?>